<#import "/admin/_layout.html" as layout>
<@layout.header "领取记录"></@layout.header>
<@layout.body>
    <div class="content-header">
        <div class="container-fluid">
            <div class="row mb-2">
                <div class="col-sm-6">
                    <ol class="breadcrumb float-sm-left">
                        <li class="breadcrumb-item"><a href="#">卡券</a></li>
                        <li class="breadcrumb-item active">领取记录</li>
                    </ol>
                </div>
            </div>
        </div>
    </div>
    <section class="content">
    <div class="container-fluid">
        <div class="card">
            <div class="card-body">
                <div class="row">
                    <a href="/admin/coupon/edit" class="btn btn-info"><i class="fas fa-plus"></i> 新增</a>
                </div>
                <table class="table table-hover" style="width:100%">
                    <thead>
                    <tr>
                        <th>ID</th>
                        <th>优惠券码</th>
                        <th>名称</th>
                        <th>领取用户</th>
                        <th>领取时间</th>
                        <th>状态</th>
                    </tr>
                    </thead>
                    <#list pageData.records as item>
                        <tr>
                            <td>${item.id!}</td>
                            <td>${item.code!}</td>
                            <td>${item.title!}</td>
                            <td>${item.nickName!}</td>
                            <td><@formatTime value = item.validTime!/></td>
                            <td>${(item.statusStr)!}</td>
                        </tr>
                    </#list>
                </table>
                <@layout._adminPage/>
            </div>
        </div>
    </div>
    </section>
</@layout.body>
<@layout.script>
    <script>
        $(".del_a").click(function() {
            var id = $(this).attr("id");
            layer.confirm('确定要删除分类吗?', {
                btn : ['确定', '取消']
            }, function(i) {
                layer.close(i);
                ajaxPost("/admin/product/category/doDelete", {id: id}, function () {
                    alertSuccess("删除成功", function(){
                        location.href = "/admin/product/category/list";
                    })
                })
            });
        })
    </script>
</@layout.script>